package com.xylx.interview.unsafe;

import org.openjdk.jol.info.ClassLayout;

public class Test1 {

    public static void main(String[] args) {
        Object obj = new Object();
        obj.hashCode();
        System.out.println(ClassLayout.parseInstance(obj).toPrintable());

        synchronized (obj) {
            System.out.println(ClassLayout.parseInstance(obj).toPrintable());
        }

        /*Integer i = new Integer(123);
        System.out.println(ClassLayout.parseInstance(i).toPrintable());

        Class1 class1 = new Class1();
        System.out.println(ClassLayout.parseInstance(class1).toPrintable());*/
    }

    static class Class1 {
        Integer f1 = 123;
        Double f2 = 12.34;
    }
}